#
#  SSF.Util.Plot Makefile
#

SHELL = /bin/sh


RELEASE = 0.7

#----------------------------------------------------------- SETUP

TOPDIR = ../../../..
include $(TOPDIR)/Makefile.common

JAVAC = javac $(JAVAC_FLAGS) -classpath $(SSFNET_TEST_CLASSPATH):$(PTII)
JAVA  = java  -classpath $(SSFNET_TEST_CLASSPATH)

# files
SOURCES = TimeSeries.java \
	  TimeSeriesComponent.java \
	  TimeSeriesAppComponent.java \
	  Analyzer.java \
	  LivePlotter.java \
	  SelfExpandingIntArray.java \
	  SelfExpandingFloatArray.java \
	  TimeSeriesWindow.java \
	  TimeSeriesAppWindow.java \
	  MultiPlot.java \
	  MultiPlotBox.java

OTHER_FILES = Makefile RCS/Plot.html,v README

CLASSES = $(SOURCES:.java=.class)

# build flags
USERCFLAGS = -g

# general targets

#----------------------------------------------------------- MAKE ALL


.PHONY : all
all :	code javadoc

.PHONY : code
code :	$(CLASSES)
	@echo "---------- Plot package built -------------"

# classes

TimeSeries.class:	TimeSeries.java
	@echo ">>> building SSF.Util.Plot package..."
	$(JAVAC) $(USERCFLAGS) TimeSeries.java

TimeSeriesComponent.class:	TimeSeriesComponent.java
	$(JAVAC) $(USERCFLAGS) TimeSeriesComponent.java

TimeSeriesAppComponent.class:	TimeSeriesAppComponent.java
	$(JAVAC) $(USERCFLAGS) TimeSeriesAppComponent.java

Analyzer.class:	Analyzer.java
	$(JAVAC) $(USERCFLAGS) Analyzer.java

LivePlotter.class:	LivePlotter.java
	$(JAVAC) $(USERCFLAGS) LivePlotter.java

SelfExpandingIntArray.class: SelfExpandingIntArray.java
	$(JAVAC) $(USERCFLAGS) SelfExpandingIntArray.java

SelfExpandingFloatArray.class: SelfExpandingFloatArray.java
	$(JAVAC) $(USERCFLAGS) SelfExpandingFloatArray.java

TimeSeriesWindow.class: TimeSeriesWindow.java
	$(JAVAC) $(USERCFLAGS) TimeSeriesWindow.java

TimeSeriesAppWindow.class: TimeSeriesAppWindow.java
	$(JAVAC) $(USERCFLAGS) TimeSeriesAppWindow.java

MultiPlot.class: MultiPlot.java
	$(JAVAC) $(USERCFLAGS) MultiPlot.java

MultiPlotBox.class: MultiPlotBox.java
	$(JAVAC) $(USERCFLAGS) MultiPlotBox.java


#----------------------------------------------------------- MAKE JAVADOC

.PHONY : javadoc
javadoc: $(SOURCES)
	@echo ">>> making java documentation..."
	@if [ -d ./doc ]; then echo "./doc exists"; else echo "creating ./doc"; mkdir ./doc; fi
	javadoc -d ./doc -classpath $(SSFNET_TEST_CLASSPATH):$(PTII) $(SOURCES)
	@echo 'done.'



#----------------------------------------------------------- MAKE TESTS

# no tests implemented
tests:
#	(cd test; $(MAKE))

#----------------------------------------------------------- MAKE CLEAN

.PHONY : clean
clean:
	@rm -f *.class
	@echo 'Done.'

#----------------------------------------------------------- MAKE SPOTLESS

spotless:
	@find . \( -name "*.class" -o -name ".*~" -o -name "*~" \) -exec rm -f {} \;
	@rm -rf doc/javadoc/*
	@echo 'Done.'

#----------------------------------------------------------- MAKE RELEASE

# mark all current versions as one consistent release
# usage: make release NAME=<symbolic name>

.PHONY : release
release:
	@echo "Making release with name: $(NAME)"
	rcs -n$(NAME): $(SOURCES) $(OTHER_FILES)


#----------------------------------------------------------- MAKE GETCODEBASE

# retrieve sources from RCS repository

.PHONY : getcodebase
getcodebase:
	@echo "Retrieving sources"
	co $(SOURCES)



#  $Id: Makefile,v 1.11 2003/02/13 20:11:11 mili Exp $
